The present invention relates generally to data communication systems. More particularly, the present invention relates to address learning in data communication switches.
Self-routed packet data communication switches route packets according to addresses contained in the packets. For example, level-2 switches route each packet according to the destination media access control (MAC) address in the packet. Each switch comprises a forwarding database (FDB) that stores associations between MAC addresses and the ports of the switch. When a packet is received having with a particular destination MAC address, the switch transmits the packet through the port associated with the particular destination MAC address.
Some switches “learn” the FDB associations from the incoming packets. That is, when a packet is received with a particular source MAC address, the switch creates an association in the FDB between the particular source MAC address and the port on which the packet was received. That association is then used to route packets subsequently received by the switch with this MAC address as the destination.
For example, Ethernet switches that are compliant with the IEEE 802.1D-1998 specification are required to “learn” the FDB associations from the incoming packets. Learning can be automatic or controlled by a central processing unit (CPU). In either case the switch sends a notification message to the CPU each time the association between a MAC address and a port changes, for example when the switch receives a packet having a source MAC address that is not associated with a port, or when a MAC address associated with one port becomes associated with another port.
However, in controlled learning, the switch may receive many more packets having the new source MAC address, and therefore send many more notification messages to the CPU, before the CPU can respond to the first notification message. This plethora of unnecessary messages can burden the CPU unnecessarily, and can even provide an opportunity for a denial-of-service attack.